<!--{assign var="menu_id" value="friend"}-->
<!--{include file="<!--{$oetplpath}-->block_header.tpl"}--> 
<!--{include file="<!--{$oetplpath}-->block_top.tpl"}--> 
<!--{include file="<!--{$oetplpath}-->block_banner.tpl"}-->
<div class="oe_inmain"> 
  <!--{include file="<!--{$oetplpath}-->block_left.tpl"}-->
  <div class="right">
    <div class="oe_ufriend">
      <div class="oe_unav"> 我的好友 </div>
      <div class="oe_utitle">
        <ul>
          <li><a href="<!--{$oefile}-->&c=friend" class="current">我的好友</a></li>
          <li><a href="<!--{$oefile}-->&c=friendapply">好友申请</a></li>
        </ul>
        <div class="clear"></div>
      </div>
      <div class="friend_list">
        <div class="total_tips">
          <p class="text"> 您共有 <b><!--{$total}--></b> 个好友！<br>
            <!--{if $total < 20}--> 
            您的好友较少，可升级会员提高人气哦！~ 
            <!--{else}--> 
            主动给好友发信、约TA，也许缘分就在身边哦！~ 
            <!--{/if}-->~ </p>
          <div class="btn"> <span class="span_1"><a href="<!--{$oefile}-->&c=vip">升级会员</a></span> <span class="span_2"><a href="<!--{$oefile}-->&c=profile">完善资料</a></span> </div>
          <div class="clear"></div>
        </div>
        
        <!--{if empty($friend)}-->
        <div class="oe_nodata">
          <p class="p_1"><img src="<!--{$userskin}-->images/nodata.jpg" /></p>
          <p class="p_2">您还没有好友哦！~</p>
          <p class="p_3"><a href="<!--{$urlpath}-->index.php?c=user">去看看</a></p>
        </div>
        <!--{else}-->
        <div class="bd"> 
          <!--{foreach $friend as $volist}-->
          <dl id="friend_<!--{$volist.friendid}-->" f="show_del">
            <dt><span><a href="<!--{$volist.homeurl}-->" target="_blank"><img src="<!--{$volist.headimg}-->" /></a></span></dt>
            <dd>
              <h3><a href="<!--{$volist.homeurl}-->" target="_blank"><!--{$volist.username}--></a></h3>
              <p class="p_1"> 
                <!--{$volist.age}-->岁 
                <!--{area type="text" value=$volist.dist1}--> <!--{area type="text" value=$volist.dist2}--> 
                <!--{if $volist.height > 0}--> 
                <!--{$volist.height}-->CM 
                <!--{/if}--> 
                <!--{hook mod="var" item="marry" type="text" value=$volist.marry}--> 
              </p>
              <p class="p_2"> <span class="span_1 cursor" f="pop_send_msg" data-touid="<!--{$volist.fuserid}-->"><i></i>发私信</span> <span class="span_3 cursor" f="pop_send_gift" data-touid="<!--{$volist.fuserid}-->"><i></i>送礼物</span> </p>
              <span class="del cursor" f="but_del" data-id="<!--{$volist.friendid}-->" style="display:none;"></span> </dd>
            <div class="clear"></div>
          </dl>
          <!--{/foreach}-->
          <div class="clear"></div>
        </div>
        <!--//bd End--> 
        <!--{if !empty($showpage)}-->
        <div class="oe_page"> <!--{$showpage}--> </div>
        <!--{/if}--> 
        <!--{/if}--> 
        
      </div>
      <!--//friend_list End--> 
      
    </div>
  </div>
  <div class="clear"></div>
</div>

<!--{include file="<!--{$oetplpath}-->block_footer.tpl"}--> 
<script type="text/javascript">
$(function(){
	//删除
	$(document).on("click", "[f='but_del']", function(){
		$_id = $(this).attr("data-id");
		$_url = _OE_FILE+"&c=<!--{$c}-->&a=del&id="+$_id;
		oeAjaxConfirmBox($_url, "确定要删除吗？", function(){
			$("#friend_"+$_id).remove();
		});
	});

	//显示隐藏 删除按钮
	$(document).on("mouseover", "[f='show_del']", function(){
		if ($(this).find(".del").css("display") == "none") {
			$(this).find(".del").show();
		}
	});
	$(document).on("mouseout", "[f='show_del']", function(){
		if ($(this).find(".del").css("display") == "block") {
			$(this).find(".del").hide();
		}
	});

});
</script>
</body></html>